<script setup>

</script>

<template>
  <div>
    <div class="main">
      <el-card style="width: 1226px;margin: 0 auto">
        <div class="up">
          <div class="imgbox">
            <img src="../assets/商品出售.jpg" alt="">
          </div>
          <div class="right">
            <h2>商品名称</h2>
            <p class="txt1">商品描述</p>
            <p class="txt2">包不包邮</p>
            <p class="txt3">2599元</p>
            <div class="btns">
              <button class="btn">加入购物车</button>
              <button class="btn" @click="dialogForm=true">提交订单</button>
              <button class="btn">联系商家</button>
            </div>
          </div>
        </div>
      </el-card>
      <el-card style="max-width: 1226px;margin: 20px auto">
        <template #header>
          <div class="card-header">
            <span>商品评价</span>
          </div>
        </template>
        <ul class="msg">
          <li class="msgList">
            <div class="box">
              <img src="../assets/相机.png" alt="">
            </div>
              <div>
                  <div>
                      <span>Tom</span>
                      <span>2024/11/11 10:43:20</span>
                  </div>
                  <textarea name="" id="">谢谢，我们会继续努力的~</textarea>
              </div>
          </li>
        </ul>
      </el-card>
    </div>

<!--提交订单的对话框-->
    <el-dialog v-model="dialogForm" title="Shipping address" width="500">
      <el-form :model="form">
        <el-form-item label="Promotion name" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off" />
        </el-form-item>
        <el-form-item label="Zones" :label-width="formLabelWidth">
          <el-select v-model="form.region" placeholder="Please select a zone">
            <el-option label="Zone No.1" value="shanghai" />
            <el-option label="Zone No.2" value="beijing" />
          </el-select>
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="dialogFormVisible = false">Cancel</el-button>
          <el-button type="primary" @click="dialogFormVisible = false">
            Confirm
          </el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<style scoped>
/* 详情 */
.main{
  width: 100%;
}
.main .up{
  width: 1226px;
  height: 400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}
.main .imgbox{
  margin-left: 200px;
  width: 300px;
}
.main img{
  width: 260px;
  height: 380px;
}
.main .right{
  width: 600px;
}
.main .right h2{
  margin-top: 20px;
  font-size: 24px;
  font-weight: 400;
  color:#212121;
}
.main .right .txt1{
  color: #b0b0b0;
  padding-top: 10px;
  line-height: 1.5;
  font-size: 17px;
}
.main .right .txt2{
  color:#ff6700;
  margin-top: 14px;
  font-size: 14px;
}
.main .right .txt3{
  font-size: 18px;
  color:#ff6700;
  padding:12px 0 22px;
}
.btns{
  height: 50px;
  margin-bottom: 20px;
}
.btn{
  width: 100px;
  height: 40px;
  line-height: 40px;
  font-size: 16px;
  background-color: #EFE154;
  border:1px solid #EFE154;
  border-radius: 5px;
  margin-right: 20px;
  cursor: pointer;
}
.msg{
  width: 800px;
  height: 500px;
  padding: 0 38px;
  box-sizing: border-box;
  background-color: rgb(204, 236, 253);
  display: flex;
  flex-direction: column;
}
.msgList{
  width: 100%;
  height: 150px;
  border-bottom: 2px solid #efefef;
  display: flex;
  justify-content: space-between;
}
.msgList>div{
  width: 860px;
  height: 100%;
}
.msgList>div>div{
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}
.msgList>div>div,.msgList p{
  margin-bottom: 10px;
}
.msgList span{
  font-size: 15px;
  color: #606262;
}
.msgList textarea{
  width: 100%;
  height: 60px;
  /* 留言板不被拖动 */
  resize: none;
  color: #b5b7b8;
}
.msgList .box{
  width: 40px;
  height: 100%;
  font-size: 35px;
  color: #a2adb8;
}
.msgList img{
  width: 25px;
  height: 25px;
  border-radius: 50%;
}
</style>